<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'系统参数'))}
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li>
				<a  href="{:U('index')}">基本设置</a>
			</li>
			<li class="layui-this">
				<a  href="#">微信设置</a>
			</li>
			<li>
				<a  href="{:U('weixin_menu')}">微信菜单</a>
			</li>
			<li>
				<a  href="{:U('config')}">系统参数</a>
			</li>
			<li>
				<a  href="{:U('push')}">推送设置</a>
			</li>
		</ul>
	</div>
	<div class="sub-frame gray" >
		<form id="form_weixin" name="form_weixin" method="post" >
			<input type="hidden" name="data_type" value="weixin">
			<div class="layui-sub-form-item ">
				<label class="layui-form-label text-right">微信可信域名*：</label>
				<div class="layui-input-block">
					<input class="layui-input" type="text" id="weixin_site_url" name="weixin_site_url" value="{$weixin_data.weixin_site_url}">
					<p>
						示例：http://xiaowei.smeoa.com/
					</p>
				</div>
			</div>
			<div class="layui-sub-form-item ">
				<label class="layui-form-label text-right" for="weixin_corp_id">CorpID*：</label>
				<div class="layui-input-block">
					<input class="layui-input" type="text" id="weixin_corp_id" name="weixin_corp_id" check="required" info="请输入CorpID" value="{$weixin_data.weixin_corp_id}">
				</div>
			</div>
			<div class="layui-sub-form-item ">
				<label class="layui-form-label text-right" for="weixin_secret">Secret*：</label>
				<div class="layui-input-block">
					<input class="layui-input" type="text" id="weixin_secret" name="weixin_secret" check="required" info="请输入Secret" value="{$weixin_data.weixin_secret}">
				</div>
			</div>
			<div class="layui-sub-form-item ">
				<label class="layui-form-label text-right" for="weixin_token">Token*：</label>
				<div class="layui-input-block">
					<input class="layui-input" type="text" id="weixin_token" name="weixin_token" value="{$weixin_data.weixin_token}" >
				</div>
			</div>
			<div class="layui-sub-form-item ">
				<label class="layui-form-label text-right">EncodingAESKey*：</label>
				<div class="layui-input-block">
					<input class="layui-input" type="text" id="weixin_encoding_aes_key" name="weixin_encoding_aes_key" value="{$weixin_data.weixin_encoding_aes_key}">
				</div>
			</div>
			<div class="layui-sub-form-item ">
				<label class="layui-form-label"></label>
				<div class="layui-input-block">
					<a id="btn_save_weixin" class="btn">保存</a>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use('global', function() {
			var $ = layui.jquery;
			

			$("#btn_save_weixin").on('click', function() {
				send_form("form_weixin", "{:U('save')}", "{:U('index')}", function(ret) {
					if (ret.status) {
						layer.msg(ret.info, {
							time : 1200
						}, function() {
							location.reload(true);
						});
					} else {
						layer.msg(ret.info);
						return false;
					}
				});
			});
		});

	</script>
</block>